package com.pig4cloud.pig.module.api.entity.product;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pig4cloud.pig.module.api.entity.wx.WxUserCashRecord;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * 订单详情内容  订单里面的 商品列对象 product_order_info
 *
 * @author ruoyi
 * @date 2021-08-11
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("product_order_info")
public class ProductOrderInfo implements Serializable {

    private static final long serialVersionUID=1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id")
    private Long id;

    private Integer propertyId;

    private Integer estateId;

    /**
     * 商户ID
     */
    private Integer merId;
    /**
     * $column.columnComment
     */
    private Long orderId;

    /**
     * $column.columnComment
     */
    private Long productId;

    /**
     * $column.columnComment
     */
    private Integer skuId;

	private String skuName;

    /**
     * 购买次数
     */
    private Integer count;

	/**
	 *  核销码
	 */
	private String verifyCode;

	/**
	 *  0 - 未核销  1 - 已核销
	 */
	private Integer isVerify;

	/**
     * 商品的单价
     */
    private BigDecimal singlePrice;

    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * $column.columnComment
     */
    private Integer state;

    /**
     * 当前商品购买的  总价格
     */
    private BigDecimal totalMoney;

    /**
     * 活动优惠掉的价格
     */
    private BigDecimal activityMinsMoney;


	private BigDecimal splitMoney;
	//是否已经分成
	private Integer isFc;
	//业主分成比例
	private BigDecimal proprietorRate;
	//业主分成
	private BigDecimal proprietorSplit;
	//物业分成比例
	private BigDecimal propertyRate;
	//物业分成
	private BigDecimal propertySplit;
	//平台分成比例
	private BigDecimal platformRate;
	//平台分成
	private BigDecimal platformSplit;

	private BigDecimal merRate;
	// 商家手续费
	private BigDecimal merFee;
	//商家结算金额
	private BigDecimal merSettlement;

	/**
	 * 清算状态 0 - 未清算  1 - 已清算
	 */
	private int settlementState;

	/**
	 * 清算状态 0 - 未清算  1 - 清算时间
	 */
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date settlementTime;

	//核销二维码
	private String qrCode;

	/**
	 *  餐馆打印机的打印状态  0 - 未打印  1 - 打印成功 2 - 打印失败
	 */
	private Integer printState;

	/**
	 *  打印次数
	 */
	private Integer printCount;

	/**
	 *  菜系品类 0 - 凉菜 1 - 热菜  2 - 烧烤 3 - 酒水  4 - 其他
	 */
	private Integer dishType;


	/**
	 * 是否是 餐饮或者抽纸，和人挂钩的必需物品 0 - 不是  1 - 是
	 */
	private Integer isTableware;

	private Long opSysUserId;
	private String opSysUserName;

	private Integer isDel;
	private Long delSysUserId;
	private String delSysUserName;
	private Date delTime;


	@TableField(exist = false)
	private String productName;

    @TableField(exist = false)
    private String shopName;

    @TableField(exist = false)
    private String storeName;

    @TableField(exist = false)
	private WxUserCashRecord cashRecord;
}
